package com.netease.pris.activity;

import android.content.Context;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.widget.Button;
import android.widget.EditText;
import com.netease.l.b.b;

class cc
  implements TextWatcher
{
  cc(ArticleGalleryActivity paramArticleGalleryActivity)
  {
  }

  public void afterTextChanged(Editable paramEditable)
  {
    int i = paramEditable.length();
    boolean bool;
    if (i > 0)
    {
      Button localButton = ArticleGalleryActivity.m(this.a);
      if (!TextUtils.isEmpty(ArticleGalleryActivity.i(this.a).getEditableText().toString().trim()))
      {
        bool = true;
        localButton.setEnabled(bool);
      }
    }
    while (true)
    {
      Object localObject = this.a.a(-1, ArticleGalleryActivity.D, null);
      if (localObject != null)
      {
        int j = ((Integer)localObject).intValue();
        if (i > j)
        {
          ArticleGalleryActivity.i(this.a).setText(ArticleGalleryActivity.i(this.a).getEditableText().subSequence(0, j));
          ArticleGalleryActivity.i(this.a).setSelection(j);
          Context localContext1 = ArticleGalleryActivity.a(this.a);
          Context localContext2 = ArticleGalleryActivity.a(this.a);
          Object[] arrayOfObject = new Object[1];
          arrayOfObject[0] = Integer.valueOf(j);
          b.a(localContext1, localContext2.getString(2131361957, arrayOfObject));
        }
      }
      return;
      bool = false;
      break;
      ArticleGalleryActivity.m(this.a).setEnabled(false);
    }
  }

  public void beforeTextChanged(CharSequence paramCharSequence, int paramInt1, int paramInt2, int paramInt3)
  {
  }

  public void onTextChanged(CharSequence paramCharSequence, int paramInt1, int paramInt2, int paramInt3)
  {
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.pris.activity.cc
 * JD-Core Version:    0.6.0
 */